//
//  kInvoiceCommandDTO.m
//  KutulusLaw
//
//  Created by Mahmood1 on 12/10/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "kInvoiceCommandDTO.h"

@implementation kInvoiceCommandDTO

- (id)initWithSessionID:(NSString *)sessionID {
    self = [super initWithSessionID:sessionID];
	
    if (self) {
		self.action = kAPI_INVOICES_ACTION;
    }
	
    return self;
}

- (void)setFileType:(NSInteger)fileType {
	if (fileType > eInvoiceFileTypeAny) {
		return;
	}
	
	_fileType = fileType;
	
	switch (self.fileType) {
		case eInvoiceFileTypeNone:
			self.fileTypeText = kVALUE_FILE_TYPE_NONE;
			break;
		case eInvoiceFileTypeNoFile:
			self.fileTypeText = kVALUE_FILE_TYPE_NO_FILE;
			break;
		case eInvoiceFileTypeAny:
			self.fileTypeText = kVALUE_FILE_TYPE_ANY;
			break;
		default:
			
			self.fileTypeText = kVALUE_FILE_TYPE_ANY;
			break;
	}
}

- (void)reset {
	[super reset];
	
	[self setFileType:eInvoiceFileTypeNone];
}

@end
